- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6.2k
Improve NuGet API Parity (#21291) #34940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
            wxiaoguang
  merged 4 commits into
  go-gitea:main
from
ScionOfDesign:improve-nuget-api-parity
  
      
      
   
  Jul 7, 2025 
      
    
                
     Merged
            
            Improve NuGet API Parity (#21291) #34940
                    wxiaoguang
  merged 4 commits into
  go-gitea:main
from
ScionOfDesign:improve-nuget-api-parity
  
      
      
   
  Jul 7, 2025 
              
            
      
        
          +183
        
        
          −58
        
        
          
        
      
    
  
Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    … bring the Gitea NuGet api more in-line with GitHub's NuGet API. This allows fixes go-gitea#21291, allowing icons to appear for NuGet packages from inside Visual Studio.
| Can we have some tests? Existing tests are in  | 
| Alright, let me look into updating the tests. | 
… the API requests.
| I have updated the tests to check for the additional values present in the API response. | 
              
                    wxiaoguang
  
              
              approved these changes
              
                  
                    Jul 7, 2025 
                  
              
              
            
            
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much!
              
                    lunny
  
              
              approved these changes
              
                  
                    Jul 7, 2025 
                  
              
              
            
            
    
  zjjhot 
      added a commit
        to zjjhot/gitea
      that referenced
      this pull request
    
      Jul 9, 2025 
    
    
      
  
    
      
    
  
* giteaofficial/main: Refactor mail template and support preview (go-gitea#34990) [skip ci] Updated translations via Crowdin Fix bug when displaying git user avatar in commits list (go-gitea#35003) Tweak placement of diff file menu (go-gitea#34999) Start automerge check again after the conflict check and the schedule (go-gitea#34989) Refactor time tracker UI (go-gitea#34983) [skip ci] Updated translations via Crowdin Improve NuGet API Parity (go-gitea#21291) (go-gitea#34940)
  
      Sign up for free
      to subscribe to this conversation on GitHub.
      Already have an account?
      Sign in.
  
      Labels
      
    lgtm/done
  This PR has enough approvals to get merged. There are no important open reservations anymore. 
  
    modifies/api
  This PR adds API routes or modifies them 
  
    modifies/go
  Pull requests that update Go code 
  
    topic/packages
  
    type/enhancement
  An improvement of existing functionality 
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Summary
Fixes #21291, allowing icons and other missing attributes to appear for NuGet packages from inside Visual Studio like they do with GitHub Nuget packages.
Adds additional NuGet package information, particularly
IconURL, to bring the Gitea NuGet API more in-line with GitHub's NuGet API.copyrighticonUrlisPrereleaselanguagelicenseUrlsummarytagsdependencyGroupstotalDownloadsReferences
Octopus Samples - Examples of NuGet packages being pushed to GitHub.
When querying for packages, Visual Studio makes a request to a route like this one:
https://nuget.pkg.github.com/OctopusSamples/OctopusSamples.accept-message/index.json
Gitea was missing the properties that GitHub responds with.

Both Gitea and Github should now look like the following with the attached package, for example. (Rename it to .nupkg)
It should be noted that GitHub also has a boolean property called
verified, but this is not part of the NuGet specification.Please let me know if anything else should be changed.